<template>
  <el-drawer v-model="dialogVisible" size="60%">
    <!-- 标题 -->
    <template #header>
      <div class="dialog-title">
        <SvgIcon icon="ep:info-filled" size="19" style="margin-right: 5px;"></SvgIcon>
        <span>排队补贴信息</span>
      </div>
    </template>

    <!-- 订单详情 -->
    <Info :id="itemId" ref="infoRef"/>
  </el-drawer>
</template>

<script lang="ts" setup>
import useDialog from '@/hooks/use-dialog.ts';
import { SvgIcon } from '@/components/icon';
import Info from './components/queue-subsidy-info.vue';
import { nextTick, ref } from 'vue';

const {dialogVisible} = useDialog(false);

const itemId = ref(0);
const infoRef = ref();
/** 打开弹窗 */
const open = (id: number) => {
  itemId.value = id;
  dialogVisible.value = true;
  nextTick(() => infoRef.value?.handleRefresh());
};

// 提供 open 方法，用于打开弹窗
defineExpose({open})
</script>

<style lang="scss" scoped>

</style>
